
import React, { useEffect, useState } from 'react';
import Head from 'next/head';
import { StoreProvider } from '@/store';
import { Login } from '@/components/Login'; 
import { Layout} from '../components/Layout'
import { setPv_new } from '@/utils';
import '@/styles/tailwind.css'; 
import '../styles/global.scss';
export default function App(props: { Component: any; pageProps: any }) { 
    const { Component, pageProps } = props

    useEffect(() => { 
        setPv_new(7607)
    },[])
    return (
        <StoreProvider initialValue={{ user: {id:0,username:'',avatar:''} }}>
            <Layout>
                <Login></Login>
                <Head>
                    <title>怪兽AI-AI绘图助你释放创造力</title>
                    <meta name="description" content="零基础，轻松绘画！尽情探索AI绘画的无限可能！先这样吧" />
                    <script id="CaptchaScript" src="https://captcha.253.com/Captcha.js" defer></script>
                    <script id="TinymceScript" src="https://js.tuguaishou.com/ips_ai_home/xie/_next/static/tinymce/tinymce.min.js" defer></script>
                   
                </Head>
                <Component pageProps={...pageProps}></Component>
            </Layout>
        </StoreProvider>
    )
}